It is important that developers are able to easily see the logical structure of database SQL statements and procedures as it makes their work faster, more effective and less error prone. The current textual representation of SQL statements and procedures is difficult to understand due in part to the declarative nature of the language and the rather awkward syntax.
In practice, SQL statements and procedures are often very long, containing hundreds or even thousands of lines of text; this makes code analysis very difficult and time consuming. Moreover, the textual representation is frequently obscure and it is difficult to understand the function of the code.
We provide a way to make working with SQL statements and procedures easier, faster and less error prone by transforming SQL from its textual form into diagrams. The “language” underlying these diagrams has been designed to describe all aspects of the SQL language in a clear and unambiguous manner and, moreover, to allow the SQL to be structured in a manner which makes the underlying logic very clear. For example, text based SQL places the end result of the statement (insert into . . . for example) at the beginning while we provide a diagrammatic language which allows it to be placed at the end.
Modification of the code is much easier when the graphic language is used because the logic is transparent. It is also much easier to group the entities within a diagram so that the structure of the program can be very readily seen, in contrast for example to a long SQL program with little visual segmentation or structuring.
The features described herein make it possible to switch between the textual and graphical representations in either direction so the results of changes can be readily seen. To achieve this we provide a product which has two converters: “SQL Text to SQL Diagram” and “SQL Diagram to SQL Text”. The latter converter is the subject of the applicant's U.S. patent application Ser. No. 12/648,660, published as US 2011/0161371, the entire contents of which are incorporated by reference herein, which includes a description of Aptitude SQL Rules and Aptitude SQL Procedures. Note that this allows changes to the program to be made to either representation, i.e. textual or graphical, and then the other representation is re-generated.
The product described herein is not limited to the visualization of SQL Statements but also covers the Database procedures which are written in languages proprietary to the database, e.g. PL/SQL for Oracle. The product described herein understands the SQL Procedures languages for Oracle, Microsoft SQL Server and Teradata V14, at least.